package com.kmxd.ams.app.event.move;

import com.kmxd.ams.app.event.move.command.VolumeChangeStatusCmd;
import com.kmxd.ams.client.event.move.VolumeChangeStatusEvent;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionalEventListener;

/**
 * 移动案卷文件监听实现
 *
 * @author nickbi
 */
@Slf4j
@Component
@AllArgsConstructor
public class VolumeChangeStatusListener {
  private final VolumeChangeStatusCmd volumeMoveCmd;

  @TransactionalEventListener(fallbackExecution = true)
  public void buildCatalog(VolumeChangeStatusEvent event) {
    volumeMoveCmd.move(event);
  }
}
